package com.lxw.manage.course.service;

import com.lxw.framework.domain.course.CourseBase;
import com.lxw.framework.domain.course.CoursePic;
import com.lxw.framework.domain.course.Teachplan;
import com.lxw.framework.domain.course.TeachplanMedia;
import com.lxw.framework.domain.course.ext.TeachplanNode;
import com.lxw.framework.domain.course.response.CoursePublishResult;
import com.lxw.framework.domain.course.response.CourseView;
import com.lxw.framework.model.response.ResponseResult;
import org.springframework.data.domain.Page;

public interface ICourseService {
    /**
     * 查询课程所属计划
     * @param courseId
     * @return
     */
    TeachplanNode findTeachplanList(String courseId);

    /**
     * 添加课程计划
     * @param teachplan
     * @return
     */
    ResponseResult addTeachplan(Teachplan teachplan);

    /**
     * 根据ID查询课程计划
     * @param id
     * @return
     */
    Teachplan findTeachplanById(String id);

    /**
     * 根据ID删除课程计划
     * @param id
     * @return
     */
    ResponseResult delTeachplan(String id);

    /**
     * 添加课程基本信息
     * @param courseBase
     * @return
     */
    ResponseResult addCourse(CourseBase courseBase);

    /**
     * 分页查询课程信息
     * @param page
     * @param pageSize
     * @return
     */
    Page<CourseBase> findList(Integer page, Integer pageSize);

    /**
     * 根据ID查询课程基本信息
     * @param courseId
     * @return
     */
    CourseBase findCoursebaseById(String courseId);

    /**
     *
     * @param courseId
     * @param courseBase
     * @return
     */
    CourseBase editCourse(String courseId,CourseBase courseBase);

    /**
     * 保存课程图片
     * @param courseId
     * @param pic
     * @return
     */
    ResponseResult addCoursePic(String courseId, String pic);

    CoursePic findCoursePicById(String courseId);

    ResponseResult delCoursePicById(String courseId);

    CourseView getModelData(String courseId);

    CoursePublishResult preview(String id);

    CoursePublishResult publish(String id);

    ResponseResult savemedia(TeachplanMedia teachplanMedia);
}
